//
//  DataBaseHandler.h
//  SweetComics
//
//  Created by dlios on 15-2-3.
//  Copyright (c) 2015年 LeeZhe. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "ComicList.h"
#import "User.h"
#import "ComicViewController.h"
@interface DataBaseHandler : NSObject
{
    sqlite3 *dbPoint;
}
+ (DataBaseHandler *)shareInstance;
// 打开数据库: 让dbPoint指向本地数据库
- (void)openDB;
// 关闭数据库:
- (void)closeDB;
// 创建表
- (void)createTable;

// 订阅、收藏
- (BOOL)insertComic:(ComicList *)comic;
// 查询所有数据
- (NSMutableArray *)selectAll;
// 修改一条数据
- (void)updateUser:(User *)user;
// 删除一条数据
- (void)deleteComic:(ComicList *)comic;
// 浏览
- (void)glanceComic:(ComicList *)comic number:(NSInteger)number count:(NSInteger)count;
// 查询收藏的数组
- (NSMutableArray *)selectCollect;
// 删除收藏
- (void)deleteCollect:(ComicList *)comic;
@end
